Integrand size = 13, antiderivative size = 101 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=\frac {a \text {arctanh}(\cos (x))}{2 b^2}+\frac {a \left (a^2+b^2\right ) \text {arctanh}(\cos (x))}{b^4}+\frac {\left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {(b-a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{b^4}-\frac {\left (a^2+b^2\right ) \csc (x)}{b^3}+\frac {a \cot (x) \csc (x)}{2 b^2}-\frac {\csc ^3(x)}{3 b} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3591, 3567, 3853, 3855, 3590, 212} \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=\frac {a \left (a^2+b^2\right ) \text {arctanh}(\cos (x))}{b^4}+\frac {\left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {\sin (x) (b-a \cot (x))}{\sqrt {a^2+b^2}}\right )}{b^4}-\frac {\left (a^2+b^2\right ) \csc (x)}{b^3}+\frac {a \text {arctanh}(\cos (x))}{2 b^2}+\frac {a \cot (x) \csc (x)}{2 b^2}-\frac {\csc ^3(x)}{3 b} \]
[In]
[Out]
Rule 212
Rule 3567
Rule 3590
Rule 3591
Rule 3853
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\frac {\int (a-b \cot (x)) \csc ^3(x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx}{b^2} \\ & = -\frac {\csc ^3(x)}{3 b}-\frac {a \int \csc ^3(x) \, dx}{b^2}-\frac {\left (a^2+b^2\right ) \int (a-b \cot (x)) \csc (x) \, dx}{b^4}+\frac {\left (a^2+b^2\right )^2 \int \frac {\csc (x)}{a+b \cot (x)} \, dx}{b^4} \\ & = -\frac {\left (a^2+b^2\right ) \csc (x)}{b^3}+\frac {a \cot (x) \csc (x)}{2 b^2}-\frac {\csc ^3(x)}{3 b}-\frac {a \int \csc (x) \, dx}{2 b^2}-\frac {\left (a \left (a^2+b^2\right )\right ) \int \csc (x) \, dx}{b^4}-\frac {\left (a^2+b^2\right )^2 \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right )}{b^4} \\ & = \frac {a \text {arctanh}(\cos (x))}{2 b^2}+\frac {a \left (a^2+b^2\right ) \text {arctanh}(\cos (x))}{b^4}+\frac {\left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {(b-a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{b^4}-\frac {\left (a^2+b^2\right ) \csc (x)}{b^3}+\frac {a \cot (x) \csc (x)}{2 b^2}-\frac {\csc ^3(x)}{3 b} \\ \end{align*}
Time = 1.65 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.96 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=-\frac {-96 \left (a^2+b^2\right )^{3/2} \text {arctanh}\left (\frac {-a+b \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )+4 b \left (6 a^2+7 b^2\right ) \cot \left (\frac {x}{2}\right )-6 a b^2 \csc ^2\left (\frac {x}{2}\right )-48 a^3 \log \left (\cos \left (\frac {x}{2}\right )\right )-72 a b^2 \log \left (\cos \left (\frac {x}{2}\right )\right )+48 a^3 \log \left (\sin \left (\frac {x}{2}\right )\right )+72 a b^2 \log \left (\sin \left (\frac {x}{2}\right )\right )+6 a b^2 \sec ^2\left (\frac {x}{2}\right )+16 b^3 \csc ^3(x) \sin ^4\left (\frac {x}{2}\right )+b^3 \csc ^4\left (\frac {x}{2}\right ) \sin (x)+24 a^2 b \tan \left (\frac {x}{2}\right )+28 b^3 \tan \left (\frac {x}{2}\right )}{48 b^4} \]
[In]
[Out]
Time = 1.46 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.67
method | result | size |
default | \(-\frac {\frac {\tan \left (\frac {x}{2}\right )^{3} b^{2}}{3}+a b \tan \left (\frac {x}{2}\right )^{2}+4 \tan \left (\frac {x}{2}\right ) a^{2}+5 \tan \left (\frac {x}{2}\right ) b^{2}}{8 b^{3}}-\frac {1}{24 b \tan \left (\frac {x}{2}\right )^{3}}-\frac {4 a^{2}+5 b^{2}}{8 b^{3} \tan \left (\frac {x}{2}\right )}+\frac {a}{8 b^{2} \tan \left (\frac {x}{2}\right )^{2}}-\frac {a \left (2 a^{2}+3 b^{2}\right ) \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 b^{4}}+\frac {\left (-16 a^{4}-32 a^{2} b^{2}-16 b^{4}\right ) \operatorname {arctanh}\left (\frac {-2 b \tan \left (\frac {x}{2}\right )+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{8 b^{4} \sqrt {a^{2}+b^{2}}}\) | \(169\) |
risch | \(-\frac {i {\mathrm e}^{i x} \left (-3 i a b \,{\mathrm e}^{4 i x}+6 a^{2} {\mathrm e}^{4 i x}+6 b^{2} {\mathrm e}^{4 i x}-12 a^{2} {\mathrm e}^{2 i x}-20 b^{2} {\mathrm e}^{2 i x}+3 i a b +6 a^{2}+6 b^{2}\right )}{3 b^{3} \left ({\mathrm e}^{2 i x}-1\right )^{3}}+\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}-\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right ) a^{2}}{b^{4}}+\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}-\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right )}{b^{2}}-\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}+\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right ) a^{2}}{b^{4}}-\frac {i \sqrt {-a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}+\frac {\left (i a +b \right ) \sqrt {-a^{2}-b^{2}}}{a^{2}+b^{2}}\right )}{b^{2}}-\frac {a^{3} \ln \left ({\mathrm e}^{i x}-1\right )}{b^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i x}-1\right )}{2 b^{2}}+\frac {a^{3} \ln \left ({\mathrm e}^{i x}+1\right )}{b^{4}}+\frac {3 a \ln \left ({\mathrm e}^{i x}+1\right )}{2 b^{2}}\) | \(387\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (93) = 186\).
Time = 0.38 (sec) , antiderivative size = 264, normalized size of antiderivative = 2.61 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=-\frac {6 \, a b^{2} \cos \left (x\right ) \sin \left (x\right ) - 6 \, {\left ({\left (a^{2} + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - b^{2}\right )} \sqrt {a^{2} + b^{2}} \log \left (-\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right ) \sin \left (x\right ) - 12 \, a^{2} b - 16 \, b^{3} + 12 \, {\left (a^{2} b + b^{3}\right )} \cos \left (x\right )^{2} + 3 \, {\left (2 \, a^{3} + 3 \, a b^{2} - {\left (2 \, a^{3} + 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) - 3 \, {\left (2 \, a^{3} + 3 \, a b^{2} - {\left (2 \, a^{3} + 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right )}{12 \, {\left (b^{4} \cos \left (x\right )^{2} - b^{4}\right )} \sin \left (x\right )} \]
[In]
[Out]
Timed out. \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=\text {Timed out} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (93) = 186\).
Time = 0.32 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.14 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=-\frac {\frac {3 \, a b \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {b^{2} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {3 \, {\left (4 \, a^{2} + 5 \, b^{2}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1}}{24 \, b^{3}} - \frac {{\left (2 \, a^{3} + 3 \, a b^{2}\right )} \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{2 \, b^{4}} - \frac {{\left (b^{2} - \frac {3 \, a b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {3 \, {\left (4 \, a^{2} + 5 \, b^{2}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (x\right ) + 1\right )}^{3}}{24 \, b^{3} \sin \left (x\right )^{3}} - \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {a^{2} + b^{2}}}{a - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b^{4}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 220 vs. \(2 (93) = 186\).
Time = 0.28 (sec) , antiderivative size = 220, normalized size of antiderivative = 2.18 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=-\frac {b^{2} \tan \left (\frac {1}{2} \, x\right )^{3} + 3 \, a b \tan \left (\frac {1}{2} \, x\right )^{2} + 12 \, a^{2} \tan \left (\frac {1}{2} \, x\right ) + 15 \, b^{2} \tan \left (\frac {1}{2} \, x\right )}{24 \, b^{3}} - \frac {{\left (2 \, a^{3} + 3 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, b^{4}} - \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b^{4}} + \frac {44 \, a^{3} \tan \left (\frac {1}{2} \, x\right )^{3} + 66 \, a b^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 12 \, a^{2} b \tan \left (\frac {1}{2} \, x\right )^{2} - 15 \, b^{3} \tan \left (\frac {1}{2} \, x\right )^{2} + 3 \, a b^{2} \tan \left (\frac {1}{2} \, x\right ) - b^{3}}{24 \, b^{4} \tan \left (\frac {1}{2} \, x\right )^{3}} \]
[In]
[Out]
Time = 12.38 (sec) , antiderivative size = 674, normalized size of antiderivative = 6.67 \[ \int \frac {\csc ^5(x)}{a+b \cot (x)} \, dx=-\mathrm {tan}\left (\frac {x}{2}\right )\,\left (\frac {5}{8\,b}+\frac {a^2}{2\,b^3}\right )-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24\,b}-\frac {a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,b^2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (4\,a^2+5\,b^2\right )+\frac {b^2}{3}-a\,b\,\mathrm {tan}\left (\frac {x}{2}\right )}{8\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (a^3+\frac {3\,a\,b^2}{2}\right )}{b^4}-\frac {\mathrm {atan}\left (\frac {\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {4\,a^4\,b^4+7\,a^2\,b^6+2\,b^8}{b^6}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^5\,b^2+16\,a^3\,b^4+7\,a\,b^6\right )}{b^5}+\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (2\,a\,b^2+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^2\,b^6+6\,b^8\right )}{b^5}\right )}{b^4}\right )\,1{}\mathrm {i}}{b^4}+\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {4\,a^4\,b^4+7\,a^2\,b^6+2\,b^8}{b^6}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^5\,b^2+16\,a^3\,b^4+7\,a\,b^6\right )}{b^5}-\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (2\,a\,b^2+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^2\,b^6+6\,b^8\right )}{b^5}\right )}{b^4}\right )\,1{}\mathrm {i}}{b^4}}{\frac {2\,\left (2\,a^7+7\,a^5\,b^2+8\,a^3\,b^4+3\,a\,b^6\right )}{b^6}+\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {4\,a^4\,b^4+7\,a^2\,b^6+2\,b^8}{b^6}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^5\,b^2+16\,a^3\,b^4+7\,a\,b^6\right )}{b^5}+\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (2\,a\,b^2+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^2\,b^6+6\,b^8\right )}{b^5}\right )}{b^4}\right )}{b^4}-\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (\frac {4\,a^4\,b^4+7\,a^2\,b^6+2\,b^8}{b^6}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^5\,b^2+16\,a^3\,b^4+7\,a\,b^6\right )}{b^5}-\frac {\sqrt {{\left (a^2+b^2\right )}^3}\,\left (2\,a\,b^2+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (8\,a^2\,b^6+6\,b^8\right )}{b^5}\right )}{b^4}\right )}{b^4}-\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,a^6+8\,a^4\,b^2+10\,a^2\,b^4+4\,b^6\right )}{b^5}}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}\,2{}\mathrm {i}}{b^4} \]
[In]
[Out]